home *** CD-ROM | disk | FTP | other *** search
/ Quick PC 62 / Quick PC 62.iso / I386 / IIS5_01.CAB / IIS_iipoptl.asp < prev    next >
Encoding:
Text File  |  1999-06-03  |  4.7 KB  |  182 lines

  1. <%@ LANGUAGE = VBScript %>
  2. <% Option Explicit %>
  3. <!-- #include file="directives.inc" -->
  4.  
  5. <!--#include file="iipoptl.str"-->
  6. <!--#include file="iisetfnt.inc"-->
  7. <!--#include file="iigtdata.str"-->
  8.  
  9. <HTML>
  10. <SCRIPT LANGUAGE="JavaScript">
  11.  
  12.     function toolFunc(){
  13.         this.mainframe = top.opener.top;
  14.         this.save = save;
  15.     }
  16.     
  17.     toolFuncs = new toolFunc();
  18.     
  19.     
  20.     function closeWin(){
  21.         top.location.href="iipopcl.asp"
  22.     }
  23.     
  24.     function ok(){
  25.         <%' We can't do getdatapaths for IE3, as it doesn't support calling object properties in %>
  26.         <% ' a parent window from a child window... just save instead. %>
  27.         <% if Session("IsIE") and Session("browserver") < 4 then %>
  28.             save();                
  29.         <% else %>
  30.             <% if Session("vtype") <> "svc" then %>        
  31.             if (top.opener.top.title.Global.siteProperties){
  32.             <% else %>
  33.             if (false){
  34.             <% end if %>
  35.                 top.connect.location.href="iisess.asp?clearPathsOneTime=False";        
  36.                 save();
  37.             }
  38.             else{
  39.     
  40.                 top.opener.top.title.Global.updated=false;
  41.     
  42.                 if (!top.opener.top.title.Global.dontAsk){
  43.                     width = <%= L_IIGTDATA_W %>;
  44.                     height = <%= L_IIGTDATA_H %>;
  45.                     popbox=window.open("iigtdata.asp","GetDataPaths","toolbar=no,scrollbars=yes,directories=no,menubar=no,width="+width+",height="+height);
  46.                     if(popbox !=null){
  47.                         if (popbox.opener==null){
  48.                             popbox.opener=self;
  49.                         }
  50.                     }
  51.                 }
  52.                 else{
  53.                     save();
  54.                 }
  55.             }
  56.         <% end if %>
  57.     }    
  58.     
  59.     function save(){
  60.         writingList=false;
  61.         mf = toolFuncs.mainframe;        
  62.         if (parent.main.head !=null){
  63.             uform=parent.main.head.document.userform;
  64.             writingList=parent.main.head.listFunc.bHasList;
  65.             parent.main.head.listFunc.writeList();
  66.         }
  67.         else{
  68.             uform=parent.main.document.userform;
  69.         }
  70.         
  71.         //mf.body.iisstatus.location.href="iistat.asp?thisState=<%= L_SAVING_TEXT %>";                
  72.         
  73.         path="?page=popup";        
  74.         for (i=0; i < uform.elements.length;i++){
  75.             thiselement=uform.elements[i];
  76.             thisname=uform.elements[i].name;
  77.             thisval=uform.elements[i].value;
  78.             thisname.toLowerCase();
  79.  
  80.             if (thisname !=""){
  81.                 if (thisname.substring(0,3)!="chk"){
  82.                     if (thisname.substring(0,3)!="txt"){                                                        
  83.                         if (thisname.substring(0,3)!="rdo"){
  84.                             if (thisname.substring(0,3)!="hdn"){
  85.                                 if (thisname.substring(0,3)!="btn"){        
  86.                                     path=path + "&" + escape(thisname);
  87.                                     path=path + "=" + escape(thisval);
  88.                                 }
  89.                             }
  90.                         }
  91.                     }
  92.                     else{
  93.                         path=path + "&" + thisname.substring(3, thisname.length);
  94.                         path=path + "=" + escape(thisval);
  95.                     }
  96.                 }
  97.                 else{
  98.                     path=path + "&" + thisname.substring(3, thisname.length);
  99.                     if (thiselement.checked){
  100.                         path=path + "="+true;
  101.                     }
  102.                     else{
  103.                         path=path + "="+false;                
  104.                     }            
  105.                 }
  106.             }
  107.             else{
  108.                 //hack to compinsate for bug in which text fields get submitted w/o a name...
  109.                 path=path + "&AspScriptErrorMessage=" + thisval
  110.             }
  111.         }
  112.             
  113.             mf.connect.location.href=("iiput.asp"+path);
  114.             if (!writingList){
  115.                 top.location.href="iipopcl.asp"
  116.             }
  117.     }
  118.  
  119.  
  120.     function helpBox(){
  121.         if (top.title.Global.helpFileName==null){
  122.             alert("<%= L_NOHELP_ERRORMESSAGE %>");
  123.         }
  124.         else{
  125.             thefile=top.title.Global.helpDir + top.title.Global.helpFileName+".htm";
  126.             window.open(thefile ,"Help","toolbar=no,scrollbars=yes,directories=no,menubar=no,width=300,height=425");
  127.         }
  128.     }
  129.  
  130.  
  131.  
  132. </SCRIPT>
  133. <BODY BACKGROUND="images/greycube.gif" TEXT="#FFFFFF" LINK="#FFFFFF" ALINK="#FFFFFF" VLINK="#FFFFFF">
  134.  
  135.  
  136. <TABLE WIDTH="100%" BORDER=0 CELLPADDING=5 CELLSPACING=1>
  137. <TR>
  138.  
  139.     <TD ALIGN="right">
  140.  
  141. <TABLE CELLPADDING=5 CELLSPACING=0>
  142.         <TR>        
  143.             <TD VALIGN="top">
  144.                 <%= sFont(2,Session("MENUFONT"),"",True) %>
  145.                 <B><A HREF="javascript:ok();">
  146.                 <IMG SRC="images/ok.gif" BORDER=0 ALIGN="top" HEIGHT=16 WIDTH=16 ALT="<%= L_OK_TEXT %>"></A>
  147.                 <A HREF="javascript:ok();"><%= L_OK_TEXT %></A></B>
  148.                 </FONT>
  149.             </TD>    
  150.             
  151.             <TD VALIGN="top">    
  152.                 <%= sFont(2,Session("MENUFONT"),"#FFFFFF",True) %>|</FONT>
  153.             </TD>
  154.  
  155.             <TD VALIGN="top">
  156.                 <%= sFont(2,Session("MENUFONT"),"",True) %>
  157.                 <B><A HREF="javascript:parent.window.close();">
  158.                 <IMG SRC="images/cncl.gif" BORDER=0 ALIGN="top" HEIGHT=16 WIDTH=16 ALT="<%= L_CANCEL_TEXT %>"></A>
  159.                 <A HREF="javascript:closeWin();"><%= L_CANCEL_TEXT %></A></B>
  160.                 </FONT>
  161.             </TD>    
  162.     
  163.             <TD VALIGN="top">    
  164.                 <%= sFont(2,Session("MENUFONT"),"#FFFFFF",True) %>|</FONT>
  165.             </TD>
  166.  
  167.             <TD VALIGN="top">
  168.                 <%= sFont(2,Session("MENUFONT"),"",True) %>
  169.                 <A HREF="javascript:helpBox();">
  170.                 <IMG SRC="images/help.gif" BORDER=0 ALIGN="top" HEIGHT=16 WIDTH=16 ALT="<%= L_HELP_TEXT %>"></A>
  171.                 <B><A HREF="javascript:helpBox();"><%= L_HELP_TEXT %></A></B>
  172.                 </FONT>
  173.             </TD>    
  174.  
  175.         </TR>
  176.         </TABLE>
  177. </TD>
  178. </TR>
  179. </TABLE>
  180.  
  181. </BODY>
  182. </HTML>